package bildbearbeitung;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

public class IcoToPngConverter_old {

	public static void main(String[] args) throws IOException {

		execDir();
		
		//convert(new File("K:\\Animes\\11eyes\\Icon.ico"), new File(
		//		"K:\\Animes\\11eyes\\test.png"));
	}

	public static void convert(File s, File d) throws IOException {

		Process p = Runtime.getRuntime().exec(
				"cmd /c convert " + s.getCanonicalPath() + " "
						+ d.getCanonicalPath());
		System.out.println("cmd /c convert " + s.getCanonicalPath() + " "
				+ d.getCanonicalPath());
	}

	public static void execDir() throws IOException {
		Process p = Runtime.getRuntime().exec("cmd /c dir");
		BufferedReader in = new BufferedReader(new InputStreamReader(p
				.getInputStream()));
		for (String s; (s = in.readLine()) != null;)
			System.out.println(s);
	}
}
